#define _CRT_SECURE_NO_WARNINGS 1


#include<queue>
#include<iostream>

using namespace std;

class Solution
{
public:
    int findKthLargest(vector<int>& nums, int k)
    {
        priority_queue<int> pq;
        for (auto& e : nums)
        {
            pq.push(e);
        }
        for (int i = 0; i < k - 1; i++)
        {
            pq.pop();
        }
        return pq.top();
    }
};